package org.example.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;
import org.example.bean.Inventory;

@Mapper
public interface InventoryDao extends BaseMapper<Inventory> {
    @Update("update smd_inventory set quantity=quantity-#{quantity} where sku=#{sku} and quantity > #{quantity}")
    void update(Inventory inventory);
}
